from matplotlib import pyplot as plt

def build_loss_fig(loss_list, title):
    loss_record = loss_list
    plt.plot([i for i in range(len(loss_record))],loss_record)
    plt.xlabel('Times')
    plt.ylabel('Loss')
    plt.title(title)
    plt.savefig('{}.png'.format(title))